home *** CD-ROM | disk | FTP | other *** search
/ Linux Cubed Series 7: Sunsite / Linux Cubed Series 7 - Sunsite Vol 1.iso / system / admin / shadow-9.tar / shadow-9 / shadow-960129 / config.h.linux < prev    next >
Text File  |  1995-12-17  |  10KB  |  345 lines

  1. /*
  2.  * Copyright 1989 - 1994, John F. Haugh II
  3.  * All rights reserved.
  4.  *
  5.  * Redistribution and use in source and binary forms, with or without
  6.  * modification, are permitted provided that the following conditions
  7.  * are met:
  8.  * 1. Redistributions of source code must retain the above copyright
  9.  *    notice, this list of conditions and the following disclaimer.
  10.  * 2. Redistributions in binary form must reproduce the above copyright
  11.  *    notice, this list of conditions and the following disclaimer in the
  12.  *    documentation and/or other materials provided with the distribution.
  13.  * 3. All advertising materials mentioning features or use of this software
  14.  *    must display the following acknowledgement:
  15.  *    This product includes software developed by John F. Haugh, II
  16.  *      and other contributors.
  17.  * 4. Neither the name of John F. Haugh, II nor the names of its contributors
  18.  *    may be used to endorse or promote products derived from this software
  19.  *    without specific prior written permission.
  20.  *
  21.  * THIS SOFTWARE IS PROVIDED BY JOHN HAUGH AND CONTRIBUTORS ``AS IS'' AND
  22.  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  23.  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  24.  * ARE DISCLAIMED.  IN NO EVENT SHALL JOHN HAUGH OR CONTRIBUTORS BE LIABLE
  25.  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  26.  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  27.  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  28.  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
  29.  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  30.  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  31.  * SUCH DAMAGE.
  32.  */
  33.  
  34. /*
  35.  * Configuration file for login.
  36.  *
  37.  *    $Id: config.h.linux,v 1.4 1995/12/17 03:50:36 marekm Exp $    (Linux)
  38.  */
  39.  
  40. #ifndef _CONFIG_H
  41. #define _CONFIG_H
  42.  
  43. #ifdef    __linux__
  44. #include <sys/types.h>
  45. #include <sys/param.h>
  46. #include <stdio.h>
  47. #endif
  48.  
  49. /*
  50.  * Pathname to the run-time configuration definitions file.
  51.  */
  52.  
  53. #define LOGINDEFS "/etc/login.defs"
  54.  
  55. /*
  56.  * Define SHADOWPWD to use shadow [ unreadable ] password file.
  57.  * Release 3 has a requirement that SHADOWPWD always be defined.
  58.  */
  59.  
  60. #define    SHADOWPWD
  61.  
  62. /*
  63.  * Define AUTOSHADOW to have root always copy sp_pwdp to pw_passwd
  64.  * for getpwuid() and getpwnam().  This provides compatibility for
  65.  * privileged applications which are shadow-ignorant.  YOU ARE
  66.  * ENCOURAGED TO NOT USE THIS OPTION UNLESS ABSOLUTELY NECESSARY.
  67.  */
  68. /*
  69.  * Yes, don't use this or libc built with the SHADOW_COMPAT=true option
  70.  * - if you do, some programs (at least chfn and chsh) will put encrypted
  71.  * passwords back in /etc/passwd.  This is NOT the right way to support
  72.  * shadow passwords on your system!  --marekm
  73.  */
  74.  
  75. #undef    AUTOSHADOW
  76.  
  77. /*
  78.  * Define SHADOWGRP to user shadowed group files.  This feature adds
  79.  * the concept of a group administrator.  You MUST NOT define this
  80.  * if you disable SHADOWPWD.
  81.  */
  82.  
  83. #define    SHADOWGRP /**/
  84.  
  85. /*
  86.  * Define DOUBLESIZE to use 16 character passwords.  Define SW_CRYPT
  87.  * to use 80 character passwords with SecureWare[tm]'s method of
  88.  * generating ciphertext.
  89.  */
  90.  
  91. /* Don't define these, instead replace crypt() in libc with something
  92.    better like the MD5-based one from NetBSD or FreeBSD - which one?
  93.    they are different...  --marekm */
  94.  
  95. #undef DOUBLESIZE
  96. #undef SW_CRYPT
  97.  
  98. /*
  99.  * Define SKEY to allow dual-mode SKEY/normal logins
  100.  */
  101.  
  102. #undef    SKEY
  103.  
  104. /*
  105.  * Define AGING if you want the password aging checks made.
  106.  * Release 3 has a requirement that AGING always be defined.
  107.  */
  108.  
  109. #define    AGING
  110.  
  111. /*
  112.  * Pick your version of DBM.  If you define either DBM or NDBM, you must
  113.  * define GETPWENT.  If you define NDBM you must define GETGRENT as well.
  114.  */
  115.  
  116. #undef    DBM
  117. #undef    NDBM
  118.  
  119. /*
  120.  * Define USE_SYSLOG if you want to have SYSLOG functions included in your code.
  121.  */
  122.  
  123. #define    USE_SYSLOG
  124.  
  125. /*
  126.  * Enable RLOGIN to support the "-r" and "-h" options.
  127.  * Also enable UT_HOST if your /etc/utmp provides for a host name.
  128.  */
  129.  
  130. #define RLOGIN
  131. #define UT_HOST
  132.  
  133. /* Define NO_RFLG to remove support for login -r flag if your system has
  134.    a new-style rlogind which doesn't need it.  --marekm */
  135.  
  136. #define NO_RFLG
  137.  
  138. /*
  139.  * Define the "success" code from ruserok().  Most modern systems use 0
  140.  * for success and -1 for failure, while certain older versions use 1
  141.  * for success and 0 for failure.  Please check your manpage to be sure.
  142.  */
  143.  
  144. #define    RUSEROK    0
  145.  
  146. /*
  147.  * Select one of the following
  148.  */
  149.  
  150. #undef DIR_XENIX    /* include <sys/ndir.h>, use (struct direct)    */
  151. #undef DIR_BSD        /* include <ndir.h>, use (struct direct)    */
  152. #define DIR_SYSV    /* include <dirent.h>, use (struct dirent)    */
  153.  
  154. /*
  155.  * Various system environment definitions.
  156.  */
  157.  
  158. #define HAVE_BASENAME
  159. #define HAVE_GETUSERSHELL
  160. #define    HAVE_ULIMIT    /* Define if your UNIX supports ulimit()    */
  161. #define    HAVE_RLIMIT    /* Define if your UNIX supports setrlimit()     */
  162. #undef    GETPWENT    /* Define if you want my GETPWENT(3) routines    */
  163. #undef    GETGRENT    /* Define if you want my GETGRENT(3) routines    */
  164. #define    NEED_AL64    /* Define if library does not include a64l()    */
  165. #undef    NEED_MKDIR    /* Define if system does not have mkdir()    */
  166. #undef    NEED_RMDIR    /* Define if system does not have rmdir()    */
  167. #undef    NEED_RENAME    /* Define if system does not have rename()    */
  168. #undef    NEED_STRSTR    /* Define if library does not include strstr()    */
  169. #undef    NEED_PUTPWENT    /* Define if library does not include putpwent()*/
  170. #define    SIGTYPE    void    /* Type returned by signal()                    */
  171.  
  172. /*
  173.  * These definitions MUST agree with the values defined in <pwd.h>.
  174.  */
  175.  
  176. #undef    BSD_QUOTA    /* the pw_quota field exists */
  177. #undef    ATT_AGE        /* the pw_age field exists */
  178. #undef    ATT_COMMENT    /* the pw_comment field exists */
  179.  
  180. #define    UID_T    uid_t    /* set to be the type of UID's */
  181. #define    GID_T    gid_t    /* set to be the type of GID's */
  182.  
  183. #ifndef    UID_T
  184. #if defined(SVR4) || defined(_POSIX_SOURCE)
  185. #define    UID_T    uid_t
  186. #else
  187. #define    UID_T    int
  188. #endif
  189. #endif
  190.  
  191. #ifndef    GID_T
  192. #if defined(SVR4) || defined(_POSIX_SOURCE)
  193. #define    GID_T    gid_t
  194. #else
  195. #define    GID_T    int
  196. #endif
  197. #endif
  198.  
  199. /*
  200.  * Define NDEBUG for production versions
  201.  */
  202.  
  203. #define    NDEBUG
  204.  
  205. /*
  206.  * Define PWDFILE and GRPFILE to the names of the password and
  207.  * group files. //jiivee
  208.  */
  209.  
  210. #define    PASSWD_FILE    "/etc/passwd"
  211. #define    PASSWD_PAG_FILE    "/etc/passwd.pag"
  212. #define    GROUP_FILE    "/etc/group"
  213. #define    GROUP_PAG_FILE    "/etc/group.pag"
  214.  
  215. #ifdef SHADOWPWD
  216. #define SHADOW_FILE    "/etc/shadow"
  217. #define SHADOW_PAG_FILE    "/etc/shadow.pag"
  218. #ifdef SHADOWGRP
  219. #define SGROUP_FILE    "/etc/gshadow"
  220. #define SGROUP_PAG_FILE    "/etc/gshadow.pag"
  221. #endif
  222. #endif
  223.  
  224. /*
  225.  * The structure of the utmp file.  There are two kinds of UTMP files,
  226.  * "BSD" and "USG".  "BSD" has no PID or type information, "USG" does.
  227.  * If you define neither of these, the type will be defaulted by using
  228.  * BSD, SUN, SYS3 and USG defines.
  229.  */
  230.  
  231. #define _UTMP_FILE "/var/run/utmp"
  232. #define _WTMP_FILE "/var/log/wtmp"
  233.  
  234. #define USG_UTMP    /**/
  235. /* #define BSD_UTMP    */
  236.  
  237. #if !defined(USG_UTMP) && !defined(BSD_UTMP)
  238. #if defined(BSD) || defined(SYS3) || defined(SUN)
  239. #define    BSD_UTMP
  240. #else
  241. #define USG_UTMP
  242. #endif    /* BSD || SYS3 || SUN */
  243. #endif /* !USG_UTMP || !BSD_UTMP */
  244.  
  245. /*
  246.  * From where to look for legal user shells
  247.  */
  248.  
  249. #ifndef SHELLS_FILE
  250. #define SHELLS_FILE "/etc/shells"
  251. #endif
  252.  
  253. /*
  254.  * Default issue file location
  255.  */
  256.  
  257. #ifndef ISSUE_FILE
  258. #define ISSUE_FILE "/etc/issue"
  259. #endif
  260.  
  261. /*
  262.  * Logoutd message file
  263.  */
  264.  
  265. #define    HUP_MESG_FILE    "/etc/logoutd.mesg"
  266.  
  267. /*
  268.  * Mail spool directory. This is used if mailspool cannot be located otherwise
  269.  */
  270.  
  271. #ifndef MAIL_SPOOL_DIR
  272. #define MAIL_SPOOL_DIR "/var/spool/mail"
  273. #endif
  274.  
  275. /*
  276.  * Where are new user default setup files kept
  277.  */
  278.  
  279. #define SKEL_DIR "/etc/skel"
  280.  
  281. /*
  282.  * New user defaults. The NEW_USER_FILE must have 6 X's in the end of name
  283.  */
  284.  
  285. #define USER_DEFAULTS_FILE    "/etc/default/useradd"
  286. #define NEW_USER_FILE        "/etc/default/nuaddXXXXXX"
  287.  
  288. /*
  289.  * Telinit program.  If your system uses /etc/telinit to change run
  290.  * level, define TELINIT and then define the RUNLEVEL macro to be the
  291.  * run-level to switch INIT to.  This is used by sulogin to change
  292.  * from single user to multi-user mode.
  293.  */
  294.  
  295. #define    TELINIT
  296. #define PATH_TELINIT    "/sbin/telinit"
  297. #define    RUNLEVEL    "2"    /**/
  298.  
  299. /*
  300.  * Crontab and atrm.  Used in userdel.c - see user_cancel().  Verify
  301.  * that these are correct for your distribution.  --marekm
  302.  */
  303.  
  304. #if 0  /* old Slackware */
  305. #define CRONTAB_COMMAND "/usr/bin/crontab -d -u %s"
  306. #define CRONTAB_FILE "/var/cron/tabs/%s"
  307. #else
  308. #define    CRONTAB_COMMAND "/usr/bin/crontab -r -u %s"
  309. #define CRONTAB_FILE "/var/spool/cron/crontabs/%s"
  310. #endif
  311.  
  312. /* Hmmm, had to #undef this since at-2.8a on Linux doesn't have an option
  313.    to remove all jobs owned by some user.
  314.  
  315.    Fortunately, atrun will not run any at jobs for users not listed in
  316.    /etc/passwd.  Unfortunately, if you remove a user and add a new user
  317.    with the same UID before it is time to run the old at job, atrun will
  318.    not notice this and run the old job.  Not good.  The best fix right
  319.    now is to remove any at jobs left over by hand, and not reuse any
  320.    previously used UID values.
  321.  
  322.    We probably should discuss this with the at maintainer...  --marekm */
  323.  
  324. #undef ATRM_COMMAND
  325.  
  326. /*
  327.  * Login times log file location.
  328.  */
  329.  
  330. #define LASTLOG_FILE "/var/log/lastlog"
  331.  
  332. /* Linux has the chfn, chsh, gpasswd, passwd commands in /usr/bin, not
  333.    in /bin (they are not needed before mounting /usr).  The directory
  334.    name must be terminated by '/'.  --marekm */
  335.  
  336. #define BIN_DIR "/usr/bin/"
  337.  
  338. /* On most Linux systems, the login prompt is "hostname login: ".
  339.    Some automatic login scripts depend on it.  If not defined, the
  340.    default is just "login: ".  %s is replaced by hostname.  --marekm */
  341.  
  342. #define LOGIN_PROMPT "%s login: "
  343.  
  344. #endif /* _CONFIG_H */
  345.